# 9.4(改自9.1)
class Restaurant:
    def __init__(self,restaurant_name,restaurant_type):
        self.name = restaurant_name.title()
        self.type = restaurant_type
        
        self.number_of_diners = 0

    def describe_restaurant(self):
        print(f"{self.name} would serves wonderful {self.type}.")

    def open_restaurant(self):
        print(f"{self.name} is open. Come on in.")

    def set_number_served(self,number_served):
        self.number_of_diners = number_served

    def increment_number_served(self,prople):
        self.number_of_diners += prople

restaurant = Restaurant('S burger','hamburger')

restaurant.describe_restaurant()
restaurant.open_restaurant()


print(f"number served:{restaurant.number_of_diners}")

restaurant.set_number_served(100)
print(f"number served:{restaurant.number_of_diners}")

restaurant.increment_number_served(50)
print(f"number served:{restaurant.number_of_diners}")

restaurant.increment_number_served(60)
print(f"number served:{restaurant.number_of_diners}")